package com.example.kafka.integration;

import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * 接收rmq消息
 */
@Component
public class MsgReceive {
    //接收普通消息，Topic.INPUT为自定义
    @StreamListener(Topic.OUTPUT)
    public void onMsg(String msg) {
        System.out.println("Topic接收到的消息："+msg);
    }
}
